package cn.onein.edu.biz.bean;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * 育儿百科文章表对应的Bean
 * @author Upton
 *
 */
public class LearnContent {
	
	private Long id;
	
	private Long categoryId;
	
	private String title;
	
	private String author;
	
	private String fullText;
	
	private Date contentDate;
	
	private String refUrl;
	
	private String tags;
	
	private Integer hits;
	
	private Integer favorites;
	
	private Boolean enable;
	
	private Date createDate;
	
	private String createBy;
	
	private Date editDate;
	
	private String editBy;
	
	private String introText;
	
	private String categoryName;

	private String categoryTilte;
	
	private String sectionName;
	
	private String sectionTitle;
	
	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public String getCategoryTilte() {
		return categoryTilte;
	}

	public void setCategoryTilte(String categoryTilte) {
		this.categoryTilte = categoryTilte;
	}

	public String getSectionName() {
		return sectionName;
	}

	public void setSectionName(String sectionName) {
		this.sectionName = sectionName;
	}

	public String getSectionTitle() {
		return sectionTitle;
	}

	public void setSectionTitle(String sectionTitle) {
		this.sectionTitle = sectionTitle;
	}

	public String getIntroText() {
		return introText;
	}

	public void setIntroText(String introText) {
		this.introText = introText;
	}
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getFullText() {
		return fullText;
	}

	public void setFullText(String fullText) {
		this.fullText = fullText;
	}

	public Date getContentDate() {
		return contentDate;
	}

	public void setContentDate(Date contentDate) {
		this.contentDate = contentDate;
	}

	public String getRefUrl() {
		return refUrl;
	}

	public void setRefUrl(String refUrl) {
		this.refUrl = refUrl;
	}

	public String getTags() {
		return tags;
	}
	
	public List<String> getTagList(){
		List<String> tagList = new ArrayList<String>();
		
		if(tags != null){
			String[] tagArray = tags.split(",");
			tagList = Arrays.asList(tagArray);		
		}
		
		return tagList;
	}

	public void setTags(String tags) {
		this.tags = tags;
	}

	public Integer getHits() {
		return hits;
	}

	public void setHits(Integer hits) {
		this.hits = hits;
	}

	public Integer getFavorites() {
		return favorites;
	}

	public void setFavorites(Integer favorites) {
		this.favorites = favorites;
	}

	public Boolean getEnable() {
		return enable;
	}

	public void setEnable(Boolean enable) {
		this.enable = enable;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public Date getEditDate() {
		return editDate;
	}

	public void setEditDate(Date editDate) {
		this.editDate = editDate;
	}

	public String getEditBy() {
		return editBy;
	}

	public void setEditBy(String editBy) {
		this.editBy = editBy;
	}
}
